package com.xk.meeting.service;

import com.xk.meeting.dao.MeetingDao;
import com.xk.meeting.dao.MeetingDaoImpl;
import com.xk.meeting.entity.Meeting;

import java.util.List;

public class MeetingServiceImpl implements MeetingService{
    private MeetingDao meetingDao = new MeetingDaoImpl();
    @Override
    public int addMeeting(Meeting meeting) {
        return meetingDao.addMeeting(meeting);
    }

    @Override
    public List<Meeting> getMeetingList() {
        return meetingDao.getMeetingList();
    }

    @Override
    public int deleteMeeting(int id) {
        return meetingDao.deleteMeeting(id);
    }

    @Override
    public Meeting getMeetingById(int id) {
        return meetingDao.getMeetingById(id);
    }

    @Override
    public int updateMeeting(Meeting meeting) {
        return meetingDao.updateMeeting(meeting);
    }

    @Override
    public String getName(int mid) {
        return meetingDao.getNameById(mid);
    }

    @Override
    public List<Meeting> getMeetingLists() {
        return meetingDao.getMeetingLists();
    }
}
